<section id="preview-fields" class="ml-24 mr-24">
	<hl-page-header title="自定义字段预览">
		<hl-button size="mini" @on-click="closeWindow">返回</hl-button>
	</hl-page-header>
	<div class="pt-15" v-if="noShow.indexOf(type) == -1">
		<div class="preview-pc--moblie border dy-flex " >
			<div class="pc--moblie-item" :class="{active: item == selectPcMoblie}" @click="selectPcMoblie = item" v-for="item in pcMoblieData">{{item}}</div>
		</div>
	</div>
	<div class="mt-10 create-customer--container">
		  <div class="cm-container" v-if="selectPcMoblie == 'PC'">		
				
				<img style="width: 929px;display: block;" class="pic-pr" v-if="type == 'CUSTOMER'" :src="headPcUrl" >
				<img style="width: 979px;display: block;" class="pic-pr" v-if="type == 'MARKET_EXPANSION_PROJECT'" :src="headPcUrl" >
				<img style="width: 971px;display: block;" class="pic-pr" v-if="type == 'CONTRACT'" :src="headPcUrl" >
				<img style="width: 979px;display: block;" class="pic-pr" v-if="type == 'VISITOR_FORM'" :src="headPcUrl" >
		    <div class="cm-wrap pb-10" style="margin-top: 30px;">
		      
		      
					
					<!-- <hl-custom-fileds :data="tmpData"></hl-custom-fileds> -->
		    	
					<div class="fields-container mb-20" v-for="(item, index) in tmpData" v-if="item.valid == '1'">
						<p class="color-gray" v-if="delHtmlTag(item.first_level_title.value).length" style="margin-bottom: 10px;" v-html="item.first_level_title.value"></p>
						<div class="line-height-34">
							<div class="color-999 dy-flex" v-if="item.type != 'line'">
								<span class="required" v-if="item.required_flag == 'Y'">*</span>
								<span style="color: #fff;" v-if="item.required_flag == 'N'">*</span>
								<div v-html="item.second_level_title.value"></div>：							
							</div>
							<div class="dy-fx-1">
								
								<!-- text mobile email phone -->
								<input type="text" :placeholder="item.placeholder || '请输入'" class="form-control" style="width: 310px;" v-if="textTypeAll.indexOf(item.type) > -1">
								
								<!-- area -->
								<textarea rows="4" :placeholder="item.placeholder || '请输入'" class="form-control" v-if="item.type == 'area'"></textarea>
								
								<!-- radio -->
								<hl-radio :data="item.radio_list" v-if="item.type == 'radio'" :inline="false"></hl-radio>
								
								<!-- checkbox -->
								<hl-checkbox :data="item.checkbox_list" v-if="item.type == 'checkbox'" :inline="false"></hl-checkbox>
								
								<!-- select -->
								<hl-select :data="item.select_list" width="310" type="primary" v-if="item.type == 'select'"></hl-select>
								
								<!-- line -->
								<div class="border-b pb-20" v-if="item.type == 'line'"></div>
								
								<!-- time date -->
								<web-calendar v-if="item.type == 'time' || item.type == 'date'" type="primary" width="310"></web-calendar>
								
								<!-- file -->
								<div v-if="item.type == 'file'">
									<div class="file-btn el-icon-upload2" ><span class="ml-10">上传</span></div>
									<div class="mt-5 color-999 font-12" >支持扩展名：.rar .zip .doc .docx .pdf .jpg</div>
								</div>
								
							</div>
						</div>
						
					</div>
					
		    </div>
		
		
		    
			</div>		
		  
			<div class="h5-container" v-if="selectPcMoblie == 'H5'">
					
					<img style="width: 375px;display: block;" :src="headMbUrl" v-if="type == 'CUSTOMER'" >
					<img style="width: 375px;display: block;" :src="headMbUrl" v-if="type == 'MARKET_EXPANSION_PROJECT'" >
				
					<!-- //自定义 -->
					<div class="mian-item">
						<div class="custom-box" v-for="(item,index) in tmpData" v-if="item.type != 'line' && item.valid == '1'">
							<div class="main-title" v-if="delHtmlTag(item.first_level_title.value).length" v-html="item.first_level_title.value"></div>
							
							<div class="item-custom" >
								
								<div class="item-flex" :class="{'item-flex-last': index == tmpData.length-1}" v-if="flexTypes.indexOf(item.type) > -1">
									<div class="l-tit">
										<span class="required" v-if="item.required == 'true'">*</span>
										<span class="color-fff" v-if="item.required == 'false'">*</span>
										<div v-html="item.second_level_title.value"></div>：
									</div>
									<div class="r-ctn">
										<span class="color-999">{{['select','time','date'].indexOf(item.type) > -1 ? '请选择' : '请输入'}}</span>
										<span class="icon-Gm-prefix-open color-999 font-12" v-if="['select','time','date'].indexOf(item.type) > -1"></span>
										<span class="icon-Gm-prefix-open color-fff font-12" v-if="textTypeAll.indexOf(item.type) > -1"></span>
									</div>
								</div>
								<div class="item-block" v-if="flexTypes.indexOf(item.type) == -1">
									<div class="t-tit">
										<span class="required" v-if="item.required == 'true'">*</span>
										<span class="color-fff" v-if="item.required == 'false'">*</span>
										<div v-html="item.second_level_title.value"></div>：
									</div>
									<div class="b-ctn">
										<!-- area -->
										<textarea rows="4" class="border br-4" style="width: 100%;" v-if="item.type == 'area'"></textarea>
										
										<!-- radio -->
										<hl-radio :data="item.radio_list" v-if="item.type == 'radio'" :inline="false"></hl-radio>
										
										<!-- checkbox -->
										<hl-checkbox :data="item.checkbox_list" v-if="item.type == 'checkbox'" :inline="false"></hl-checkbox>
										
										<!-- select -->
										<hl-select :data="item.select_list" type="primary" v-if="item.type == 'select'"></hl-select>																			
										
										<!-- file -->
										<div v-if="item.type == 'file'">
											<div class="file-btn el-icon-upload2" style="padding: 5px 10px;"><span class="ml-10">上传</span></div>
											<div class="mt-5 color-999 font-12" >支持扩展名：.rar .zip .doc .docx .pdf .jpg</div>
										</div>
										
									</div>
								</div>
								
							</div>
						</div>										
					</div>
				</div>
			</div>	
	</div>
</section>

<style type="text/css">		
	.item-block .hl-checkbox-container .hl-checkbox-inner {
		top: 4px;
	}
	
	.item-block .t-tit {
		display: flex;
		height: 34px;
		align-items: center;
	}
	
	.item-block .b-ctn {
		padding-bottom: 5px;
	}
	
	.item-flex {
		display: flex;
		justify-content: space-between;
		height: 34px;
		align-items: center;
		border-bottom: 1px solid #e5e5e5;
	}
	
	.item-flex-last {
		border-bottom: 0;
	}
	
	.item-flex .l-tit {
		display: flex;
	}
	
	.color-fff {
		color: #fff;
	}
	
	.item-ntr {
		display: flex;
		justify-content: space-between;
		align-items: center;
		height: 34px;
	}
	
	.main-title {
		font-size: 14px;
		font-family: PingFangSC, PingFangSC-Medium;
		font-weight: 500;
		color: #666666;
		line-height: 40px;
		position: relative;
		font-weight: bold;
	}
	
	.main-title::before {
		content: '';
		width: 4px;
		height: 10px;
		background: #5E67A5;
		position: absolute;
		left: -10px;
		top: 15px;
	}
	
	.mian-item {
		background: #ffffff;
		border-radius: 4px;
		box-shadow: 0px 0px 8px 0px #c5ccfc;
		padding: 0 20px;
		margin-bottom: 15px;
		margin-left: 15px;
		margin-right: 15px;
	}
	
	.main-content {
		width: 90%;
		margin: -40px auto 0;
	}
	
	.h5-container {
		width: 375px;
		margin: 30px auto;
	}
	
	.head-title {
		display: flex;
		align-items: center;
		justify-content: center;
		padding-top: 30px;
	}
	
	.head-title img {
		width: 27px;
		height: 30px;
	}
	
	.head-title span {
		color: #fff;
		margin: 0 15px;
		font-size: 16px;
		font-weight: bold;
	}
	
	.head-box {
		width: 375px;
		height: 132px;
		background: linear-gradient(#6772c0, #927ce5);
	}
	
	.file-btn {
		border: 1px solid #ddd;
		background-color: #fff;
		padding: 8px 20px;
		cursor: pointer;
	}
	.hl-checkbox-container .hl-checkbox-inner {
		top: 10px;
	}
	.preview-pc--moblie {
		width: 212px;
		border-radius: 4px;
		overflow: hidden;
	}
	.pc--moblie-item {
		flex: 1;
		height: 34px;
		line-height: 34px;
		text-align: center;
		cursor: pointer;
	}
	.pc--moblie-item.active {
		background: #565e99;
		color: #fff;
	}
	
	.searchBut {
	  display: flex;
	  align-items: center;
	  padding-left: 9px;
	  position: absolute;
	  right: 10px;
	  top: 0px;
	  cursor: pointer;
	}
			
	.searchBut-block {
	  position: absolute;
	  right: 65px;
	  top: 8px;
	  display: inline-block;
	  height: 18px;
	  width: 1px;
	  background: #F2F2F2;
	}
			
	.cmNameList {
	  position: absolute;
	  z-index: 99;
	  top: 35px;
	  width: 100%;
	  background: #fff;
	  max-height: 170px;
	  overflow-y: auto;
	  cursor: pointer;
	}
			
	.createCm h3 {
	  margin: 0 !important;
	  font-weight: bold;
	  color: #999;
	}
			
	.cm-container {
	  margin: 20px 0;
	}
			
	.cm-commercial-logo {
	  width: 140px;
	}
			
	.cm-commercial-logo img {
	  width: 138px;
	  height: 138px;
	  border: 1px solid #ddd;
	  display: block;
	}
			
	.cm-commercial-wrap {
	  width: 685px;
	  margin-left: 50px;
	}
			
	.cm-indent {
	  text-indent: 3em;
	}
			
	.box-cm-active {
	  box-shadow: 0px 0px 4px 0px rgba(238, 49, 49, 1) inset !important;
	}
			
	.cm-commercial {
	  box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
	  border-radius: 4px;
	  padding-left: 8px;
	  padding-right: 8px;
	  margin-bottom: 20px;
	}
			
	.validata-customer {
	  background-color: rgba(0, 0, 0, 0.5);
	  position: fixed;
	  left: 0;
	  top: 0;
	  right: 0;
	  bottom: 0;
	  z-index: 999;
	  display: flex;
	  justify-content: center;
	  align-items: center;
	}
			
	.validata-control {
	  width: 400px;
	  border-radius: 4px;
	  background-color: #fff;
	  text-align: center;
	  overflow: hidden;
	  position: relative;
	}
			
	.validata-control .close {
	  position: absolute;
	  right: 0;
	  top: 0;
	  width: 40px;
	  height: 40px;
	  line-height: 40px;
	}
			
	.validata-control h3 {
	  font-size: 16px;
	  line-height: 45px;
	  color: #565e99;
	  font-weight: bold;
	}
			
	.validata-control p {
	  padding: 40px 0 53px;
	}
			
	.blue-button {
	  background-color: #565e99;
	  color: #fff;
	  line-height: 50px;
	}
			
	.gray-button {
	  background-color: #f2f2f2;
	  line-height: 50px;
	  color: #666
	}
			
	.cmNameList li {
	  padding-left: 12px
	}
			
	
	/* .hl-checkbox-container ul{
	  display: flex;
	  align-items: center;
	  flex-wrap: wrap
	} */
	.hl-checkbox-container .item{
	  margin-bottom: 0
	}
	.alignItems{
	  align-items: flex-start!important;
	}
</style>

<script src="modules/custom/scripts/preview-fields.js" charset="utf-8"></script>